package com.zyb.patient.view;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.zyb.patient.R;

public class AboutCommonDialog extends Dialog {

	private TextView title;
	private TextView content;
	private TextView ok;
	private TextView cancle;

	public AboutCommonDialog(Context context) {
		super(context, R.style.MyDialog);
		setContentView(R.layout.view_common_dialog);
		title = (TextView) findViewById(R.id.title);
		content = (TextView) findViewById(R.id.content);
		cancle = (TextView) findViewById(R.id.cancle);
		ok = (TextView) findViewById(R.id.ok);
		ok.setTag(AboutCommonDialog.this);
		cancle.setTag(AboutCommonDialog.this);
	}

	public TextView getTitleLayout() {
		return title;
	}

	public TextView getcontentLayout() {
		return content;
	}

	public void setTitle(String t) {
		title.setText(t);
	}

	public void setContent(String c) {
		content.setText(c);
	}
	
	public void setOkContent(String c){
	    ok.setText(c);
	}
	
	public void setCancleContent(String c){
	    cancle.setText(c);
    }
	
	public void setOkOnClick(View.OnClickListener listener) {
		ok.setOnClickListener(listener);
	}

	public void setCancleOnClick(View.OnClickListener listener) {
		cancle.setOnClickListener(listener);
	}
	
	public void setCancleGone(){
	    cancle.setVisibility(View.GONE);
	}

}
